# TempConvert(-1)
tempAtr = input("请输入一个温度值：")
flag = tempAtr[-1:-2:-1]
if flag in ["F", "f", "C", "c"]:
    num = eval(tempAtr[0:-1:1])
    if flag in ["F", "f"]:
        c_num = (num - 32) / 1.8
        print("转换后的温度为{:.2f}".format(c_num) + "摄氏度")
    elif flag in ["C", "c"]:
        f_num = num * 1.8 + 32
        print("转换后的温度为{:.2f}".format(f_num) + "华氏度")
else:
    print("输入格式有误！")
